<template>
  <van-tabbar
    route
    v-model="active"
    active-color="#ee0a24"
    inactive-color="#000"
    :fixed="false"
  >
    <van-tabbar-item icon="home-o" to="/home"> 首页 </van-tabbar-item>
    <van-tabbar-item icon="search" to="/category">分类</van-tabbar-item>
    <van-tabbar-item icon="shopping-cart-o" to="/ShoppingCart"
      >购物车</van-tabbar-item
    >
    <van-tabbar-item icon="user-o" to="/MyPage"> 我的 </van-tabbar-item>
  </van-tabbar>
</template>

<script>
export default {
  name: "FooterCom",
  data() {
    return {
      active: 0,
    };
  },
  methods: {
    MyPage() {
      this.$router.replace("/MyPage").catch(() => {});
    },
    ShoppingCart() {
      this.$router.replace("/ShoppingCart").catch(() => {});
    },
  },
};
</script>

<style scoped>
</style>